@import "mixins";

.rct-form {
  position: relative;
  input[readonly], textarea[readonly] {
    background-color: #eee; /* menu hover bg color */
    color: #777; /* menu text color */
    border-color: #ccc;
  }

  input[disabled], textarea[disabled] {
    cursor: not-allowed;
    background-color: #eaeded;
    color: #cad2d3;
  }

  .rct-form-mask {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1000;
  }
}

.rct-form-aligned {
  .rct-control-group {
    position: relative;
    padding-left: 11em;
    margin-bottom: 1em;
    min-height: 2em;
    .box-sizing(border-box);

    & > label {
      text-align: left;
      display: block;
      width: auto;

      &.required:before {
        content: '*';
        display: inline-block;
        font-family: SimSun;
        margin-right: 4px;
        color: @red;
      }
    }

    .rct-checkbox-group, .rct-radio-group {
      padding-top: 0.15em;

      &.rct-inline label {
        display: inline-block;
      }
    }

    .rct-rating {
      margin-top: 0.1em;
    }

    .fetch-pending, .fetch-failure {
      display: block;
      padding: 6px 9px;
      line-height: normal;
    }

    .fetch-failure {
      color: @red;
    }

    & > .label {
      position: absolute;
      text-align: right;
      width: 10em;
      left: 0;
      top: 0;
      line-height: 2em;
    }
  }
}

.rct-form-inline {
  .rct-control-group {
    display: inline-block;
    margin-right: 0.6em;
  }

  .rct-form-control {
    vertical-align: middle;
  }
}

@media (max-width: 567px) {
.rct-form-aligned {
  .rct-control-group {
    padding-left: 0;
    & > .label {
      position: relative;
      top: 0;
      text-align: left;
    }
  }
}

.rct-form-inline {
  .rct-control-group {
    display: block;
  }
}
}
